package com.cqu.lpss.service.impl;

import com.cqu.lpss.mapper.ScoreDetail1Mapper;
import com.cqu.lpss.pojo.Scoredetail1;
import com.cqu.lpss.service.ScoreDetail1Interface;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;
@Service
@Slf4j
public class ScoreDetail1Impl implements ScoreDetail1Interface {
    @Autowired
    ScoreDetail1Mapper scoreDetail1Mapper;
    @Override
    public int insertDetail(List<Scoredetail1> scoredetail1s) {
        for(int i = 0;i<scoredetail1s.size();i++){
            scoredetail1s.get(i).setSdTime1(new Timestamp(System.currentTimeMillis()));
        }
        int ans = scoreDetail1Mapper.batch_insertDetail(scoredetail1s);
        return ans;
    }
}
